package com.zp.collection;

import java.util.Comparator;

public class Mycomparator implements Comparator<Object>{
	@Override
	public int compare(Object o1, Object o2) {
		
		String str1 = (String)o1;
		String str2 = (String)o2;
		
		int result = str2.compareTo(str1); //倒序；
//		int result = str1.compareTo(str2); //正序；
		
		return result;
	}
}
